[JENKINS-68518] Email-ext treats transient SMTP errors as fatal errors#1473
[JENKINS-68518] Email-ext treats transient SMTP errors as fatal errors#1473akash-manna-sky wants to merge 12 commits intojenkinsci:mainfrom
Conversation
|
Please review the changes. @slide |
|
Please rebase |
I updated my branch. Please review. @slide |
|
Hi @akash-manna-sky! The implementation looks solid. A few observations after reviewing the code: isTransientSmtpError() correctly handles exception chaining via getNextException() and getCause() One suggestion: In parseSmtpErrorCode(), the regex ^(\d{3})\s only matches codes at the start of the message. Some SMTP servers return messages like "Temporary error: 421 Service unavailable" where the code is not at the start. Consider also checking mid-message patterns. |
|
Hi 👋 Thanks for the detailed implementation — this looks really well thought out. While going through the changes, I had a small observation regarding SMTP error parsing. In some cases, servers may return messages where the status code is embedded mid-message (e.g., "Temporary error: 421 Service unavailable"). Would it make sense to extend the parsing logic to handle such patterns as well, or is the current approach sufficient for most providers? Just sharing this as a thought — great work overall! |
[JENKINS-68518] Email-ext treats transient SMTP errors as fatal errors
Fixes #1380
Testing done
Submitter checklist